<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
	<th:block th:include="include :: header('绑定品牌')" />
	<th:block th:include="include :: select2-css" />
</head>

<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<form class="form-horizontal m" id="form-bind-brand">
			<div class="row">
				<select id="brand" class="form-control select2-multiple" multiple>
					<option th:each="brand:${brands}" th:value="${brand.brandId}" th:text="${brand.brandName}" th:selected="${brand.flag}"
						 th:disabled="${brand.status == '1'}"></option>
				</select>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: select2-js" />
	<script th:inline="javascript">
		var prefix = ctx + "shop/goods/category";
		
	    function getBrandIds() {
			return $("#brand").val();
		}
		
		$(function() {
            $('#brand').select2({
                placeholder: "请选择品牌",
                allowClear: true
            });
        })

	</script>
</body>

</html>